clc
clear

function h = SPHERE(x,y,z,r)
  [X,Y,Z] = sphere(50);
  h = surf(r*X+x,r*Y+y,r*Z+z);
  set(h,'EdgeColor','none')
end

figure;
hold on
axis equal;
axis([-1.1,1.1,-1.1,1.1,-1.1,1.1])
h = SPHERE(0,0,0,1);

function h = plot_coord(long, lat)
    [a,b,c] = sph2cart(long/180*pi,lat/180*pi,1);
    h = scatter3(a,b,c);
    return
end

for lat = -80:10:80
    [a,b,c] = sph2cart((0:10:360)/180*pi,lat/180*pi,1.02);
    plot3(a,b,c);
end

for long = 0:10:360
    [a,b,c] = sph2cart(long/180*pi,(-90:10:90)/180*pi,1.02);
    plot3(a,b,c);
end


